# -*- coding: utf-8 -*-
import os
import sys
from pathlib import Path

from PySide2.QtWidgets import *

from CustomPlugin import CustomPlugin
from TESS_PythonAPI.Tessng import *

if __name__ == '__main__':

    app = QApplication()

    workspace = os.fspath(Path(__file__).resolve().parent)
    config = {'__workspace': workspace,
              '__netfilepath': r"D:\仿真\tessng\data_set_simulator\tongluoshan\file\铜锣山隧道.tess",
              '__simuafterload': True,
              '__custsimubysteps': True
              }
    plugin = CustomPlugin()
    factory = TessngFactory()
    tessng = factory.build(plugin, config)
    if tessng is None:
        sys.exit(0)
    else:
        sys.exit(app.exec_())
